package org.bupt.pluginapp;

import android.content.ComponentName;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.util.Log;

public class PluginInfo {
	private String packageName;
	private String activityName;
	private Drawable icon;
	private static final String LOG_TAG = "PluginApp";
	
	public PluginInfo(String packageName, String activityName, Drawable icon) {
		super();
		this.packageName = packageName;
		this.activityName = activityName;
		this.icon = icon;
	}	
	
	public String getPackageName() {
		return packageName;
	}

	public String getActivityName() {
		return activityName;
	}

	public Drawable getIcon() {
		return icon;
	}
	
	public Intent setStartPluginIntent(){
		Intent it =new Intent(Intent.ACTION_VIEW);
		ComponentName componentName=new ComponentName(packageName,activityName);
		Log.d( LOG_TAG, "is "+componentName );
		it.setComponent(componentName);
		return it;
	}
}
